package cn.ekuma.odbo.mobile

/*
import com.openbravo.data.loader.dialect.SQLite.SQLiteDBDialect
import com.openbravo.data.loader.sqlbuilder.QBFBuilder
import e.odbo.data.dsl.query.QBF
import kotlin.reflect.KClass
import kotlin.reflect.KProperty

fun <T> KProperty<T>.colName()=this.name

fun <T> KProperty<T>.colName(clazz: KClass<Any>)=clazz.tableName()+"."+this.colName()

fun <T:Any> KClass<T>.tableName()=this.simpleName

fun QBF.toWhereSQL()=QBFBuilder.getFilterSQL(this.build())

fun QBF.toSQL(querySql:String)=QBFBuilder(querySql).getSQL(this.build())

fun <T> QBF.eq(prop:KProperty<T>, value: T): QBF = this.eq(prop.colName(),value)

fun <T> QBF.eqNot(prop:KProperty<T>, value: T): QBF  = this.eqNot(prop.colName(),value)

fun <T> QBF.inList(prop:KProperty<T>, values: List<T>): QBF  = this.`in`(prop.colName(),values)

fun <T>  QBF.nul(prop:KProperty<T>): QBF = this.nul(prop.colName())

fun <T> QBF.notNul(prop:KProperty<T>): QBF  = this.notNul(prop.colName())

fun QBF.like(prop:KProperty<String>, value: String): QBF = this.like(prop.colName(),value)

fun <T> QBF.le(prop:KProperty<T>, value: T): QBF  = this.le(prop.colName(),value)

fun <T> QBF.leVeq(prop:KProperty<T>, value: T): QBF = this.leVeq(prop.colName(),value)

fun <T> QBF.ge(prop:KProperty<T>, value: T): QBF = this.ge(prop.colName(),value)

fun <T> QBF.geVeq(prop:KProperty<T>, value: T): QBF  = this.geVeq(prop.colName(),value)

object OdboExtensions {
    val sqLiteDBDialect=SQLiteDBDialect()
}*/
